
#include "iostream"
#include "vector"
#include "unordered_map"
#include "unordered_set"
#include "algorithm"
#include "string"
#include "list"
#include "string.h"

class OneLoop {
public:
    std::vector<int> fama;
    bool dfs(int wupin,int index,int weight){
        if(weight==-10){
            printf("");
        }
        if(weight==-8){
            printf("");
        }
        if(weight==wupin){
            return true;
        }
        if(index==fama.size()){
            return false;
        }
        for(int i=index;i<fama.size();i++){
            if(dfs(wupin,i+1,weight+fama[i])){
                return true;
            }
            if(dfs(wupin,i+1,weight-fama[i])){
                return true;
            }
        }
        return false;
    }
    void run(
           int a,int b
    ) {
        fama.resize(a);
//        wupin.resize(b);
        for(int i=0;i<a;i++){
            std::cin>>fama[i];
        }

        for(int i=0;i<b;i++){
            int in;
            std::cin>>in;
            if( dfs(in,0,0)){
                printf("YES\n");
            }else{
                printf("NO\n");
            }

//            std::cin>>wupin[i];
        }

    }
};

class Solution {
public:
    void run() {

        bool first = true;
        int a, b, c, d, e;
        while(std::cin>>a>>b){
            OneLoop loop;
            loop.run(a,b);
        }


    }
};

int main() {
//    bool cur_num= true;
    Solution().run();
    return 0;
}

